package com.lvyq.myplayer.model.singer

import android.util.Log
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.lvyq.myplayer.net.api.indexDailyPlayApiService
import kotlinx.coroutines.launch

/**
 * 文件描述：SingerInfoModel
 * 作者：lvyq
 * 创建时间：2025-04-23
 * 修改时间：2025-04-23
 */
class SingerInfoModel: ViewModel() {
    val _data = MutableLiveData<SingerInfoBean>()
    val data : LiveData<SingerInfoBean> =_data

    fun getSingerLst(letter:String?,singerType:Int?,sexType:Int?){
        viewModelScope.launch {
            var result = indexDailyPlayApiService.getSingerLst(letter,singerType,sexType)
            if (result.isSuccessful){
                _data.value=result.body()
            }
        }
    }
}